var bulidPath = function (separater) {
    var fillZero = function (num) {
        if (num < 10) {
            return "0" + num;
        } else {
            return "" + num;
        }
    };
    var defaultSeparater = "-"; //推荐 a_b a-b ,默认 a-b
    if (separater == null || separater === undefined) {
        separater = defaultSeparater;
    }
    var date = new Date();
    var year = fillZero(date.getFullYear());
    var month = fillZero(date.getMonth() + 1);
    var dayOfMonth = fillZero(date.getDate());
    var hour = fillZero(date.getHours());
    var minute = fillZero(date.getMinutes());
    var seconed = fillZero(date.getSeconds());
    return {
        /**
         * 整个时间都用上
         */
        style1: [year, month, dayOfMonth, hour, minute, seconed].join(
            separater
        ),
        style2: [
            [year, month, dayOfMonth].join(separater),
            [hour, minute, seconed].join(separater),
        ],
        style3: [year, month, dayOfMonth, hour, minute, seconed],
    };
};

var pathObj = bulidPath();
console.log(pathObj);
